#coding=utf-8
#s = "i,am,lilei"
#a = s[2:4]
#print a
#bool("2012" == 2012)
#False

c = open('text.txt','r')
a = c.read()
f = a.decode('utf-8')
print f
print '----------------------------------------'
c = len(f)
print c
print '----------------------------------------'
b = f.replace('/n','')
print b
print '----------------------------------------'
e = f.replace('2012', '2013')
print e
print '----------------------------------------'
g = f[-2:]
print g
print '----------------------------------------'
h = f[0:11]
print h
print len(h)
print '----------------------------------------'
j = f.replace('2012', '2013').encode('utf-8')
k = open('test1.py','w')
k.write(j)
k.close()
print '----------------------------------------'
print f[len(f)/2:len(f)/2+5].encode('utf-8')


import time
tm = time.time()
print tm

print '----------------------------------------'

import sys
a = "中文编程"
print sys.getrefcount(a)

m = "字符串拼接1"
n = "字符串拼接2"
q = m + ',' + n
print q
print len(q)
print  q.decode('utf-8')[6].encode('utf-8')
